#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
#define N 21347
string HashMap[N];
int n, ans = 0;
string str;
int calHash(string &str)
{
    //计算散列函数
    int num = 0;
    for (int i = 0; i < str.length(); ++i)
    {
        num = ((num << 5) | (num >> 27));
        num += ((int)str[i] + N) % N;
    }
    return (size_t)(num) % N;
}
int searchStr(string &str)
{
    int index = calHash(str), i = 1;
    int tmp = index;
    while (HashMap[tmp].length() > 0 && HashMap[tmp] != str)
    {
        tmp = (index + i * i) % N;
        if (HashMap[tmp].length() == 0 || HashMap[tmp] == str)
            break;
        tmp = (index - i * i + N) % N;
        i++;
    }
    return tmp;
}
bool putStr(string &str)
{
    //首先搜寻HashMap,返回结果
    int index;
    index = searchStr(str);
    if (HashMap[index] != str)
    {
        HashMap[index] = str;
        ans++;
        return true;
    }
    return false;
}
int main()
{
    ios::sync_with_stdio(false);
    cin >> n;
    while (n--)
    {
        cin >> str;
        putStr(str);
    }
    cout << ans << endl;
    return 0;
}